<#assign base=request.contextPath />
<#assign oneLabel="ERP管理">

<#assign twoLabel="工资管理">
<#assign twoUrl=base+"/customer/list">

<#assign leafLabel="工资列表">
<!DOCTYPE html>
<html lang="en">
<head>
	<#include "/commons/headImport.ftl">
</head>
<body>
<#include "/commons/header.ftl">
<form class="form-horizontal" name="formName">
<div class="row">
	<div class="col-xs-12">
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right">月份</label>
			<div class="col-sm-3">
				<div class="row">
                    <div class="col-xs-10">
                        <div class="input-group input-group-sm">
                            <input type="text" class="form-control date-picker" name="qbuyDate" AUTOCOMPLETE="off"
                            	value="${queryVO.qbuyDate!''}" data-date-format="yyyy-mm"/>
                            <span class="input-group-addon"><i class="icon-calendar"></i></span>
                        </div>
                    </div>
            	</div>
			</div>
			<label class="col-sm-2 control-label no-padding-right">姓名</label>
			<div class="col-sm-3">
				<input type="text" name="qname" value="${queryVO.qname!''}" class="col-xs-10 col-sm-10" />
			</div>
		</div>
		<div class="space-4"></div>
					
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right"></label>
			<div class="col-sm-3">
			</div>
			<div class="col-sm-4orm-group center">
				<button class="btn btn-xs btn-success" type="button" id="search_id" url="${base}/salary/list">
					<i class="icon-search icon-on-right bigger-110"></i>查询
				</button>
				<button class="btn btn-xs" type="reset" id="reset_id" url="${base}/salary/list">
					<i class="icon-undo bigger-110"></i>重置
				</button>
			</div>
		</div>
		<div class="space-4"></div>
				
		<div class="table-responsive">
			<table class="table table-striped table-bordered table-hover">
				<thead>
					<tr>
						<th class="center" width="5%">#</th>
						<th width="15%">姓名</th>
						<th width="15%">月份</th>
						<th width="15%">金额</th>
						<th width="50%"></th>
					</tr>
				</thead>
				<tbody>
				<#if pr??>
					<#list pr.data as data>						
					<tr>
						<td class="center">${data_index+1}</td>
						<td>${data.name}</td>
						<td>${(data.buyDate)!''}</td>
						<td>${((data.amount/100.0)?string.currency)!0.0}</td>								
						<td>
							<div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
								<@shiro.hasPermission name="/payment/queryDetail">
								<a class="btn btn-minier btn-info detail_id" href="javascript:void(0);" 
									a="${data.name}" buyDate='${(data.buyDate)!''}' type=0
									url="${base}/payment/queryDetail" title="详细">
									<i class="icon-search bigger-120"></i>详细
								</a>
								</@shiro.hasPermission>
							</div>
						</td>
					</tr>
					</#list>
				</#if>
				<#if ((pr.data)?size==0)>
					<tr>
						<td colspan="18" class="center">没有查询任何数据</td>
					</tr>
				</#if>
				</tbody>
			</table>
			<@p.p pageParam=pr toURL="${base}/salary/list" formName="formName"/>
		</div><!-- /.table-responsive -->
	</div><!-- /row -->
</form>
<#include "/commons/footer.ftl">
<script src="${base}/static/assets/js/date-time/bootstrap-datepicker.min.js"></script>
<script src="${base}/static/assets/js/date-time/bootstrap-datepicker.zh-CN.js"></script>
<script src="${base}/static/js/erp/artificial.js"></script>
<script src="${base}/static/layer/layer.js"></script>
<script type="text/javascript">
	jQuery(function($) {
	   $('.date-picker').datepicker({
	   		language: 'zh-CN',//选择语言
	   		todayHighlight: true, //是否今日高亮
			autoclose: true,
			todayHighlight: true,
            startView: 'months',
            maxViewMode:'years',
            minViewMode:'months',
           	clearBtn: true  //添加清除按钮，可选值：true/false
		})
		
	   $(".detail_id").click(function(){
	   		var url=$(this).attr("url");
	   		url=url+"?qname="+$(this).attr("a")+"&qbuyDate="+$(this).attr("buyDate")+"&qtype="+$(this).attr("type");
			layer.open({
		      type: 2,
		      title: '工资明细',
		      maxmin: true,
		      shadeClose: true, //点击遮罩关闭层
		      area : ['800px' , '450px'],
		      content: url
		    });
	   });
	   
	});
</script>
</body>
</html>
